Skip to content

fix: wait for child run starts before a reboot or metamorph - #1272

Open
vdusek wants to merge 1 commit into
feat/resurrect-child-runs-with-parentfrom
fix/wait-for-child-run-starts
Open

vdusek wants to merge 1 commit into
feat/resurrect-child-runs-with-parentfrom
fix/wait-for-child-run-starts

Conversation

@vdusek

@vdusek vdusek commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Part 5 of 7 of the target state of Actor composability, sections 8.2 and 8.4. Stacked on #1271.

Actor.reboot() and Actor.metamorph() wait for the child run start requests that are already sent, at most 10 seconds, before they send their own request. So every started run has a record, and the next process (or the target Actor) gets it back from the registry and does not start it again.

From that moment the SDK also holds back the start requests that are not sent yet, because the process can stop before it records their runs. A reboot or metamorph request that fails lets them go out again.

✍️ Drafted by Claude Code

@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 20, 2026
@vdusek
vdusek added this pull request to stack #1274 November 20, 2026 16:35
@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.47826% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.08%. Comparing base (3c84975) to head (8e2a4da).

Files with missing lines Patch % Lines
src/apify/_actor.py 72.72% 3 Missing ⚠️
Additional details and impacted files
@@                            Coverage Diff                            @@
##           feat/resurrect-child-runs-with-parent    #1272      +/-   ##
=========================================================================
- Coverage                                  94.09%   94.08%   -0.02%     
=========================================================================
  Files                                         54       54              
  Lines                                       4115     4156      +41     
=========================================================================
+ Hits                                        3872     3910      +38     
- Misses                                       243      246       +3     
Flag Coverage Δ
e2e 30.79% <32.60%> (+0.05%) ⬆️
integration 49.30% <32.60%> (-0.13%) ⬇️
unit 91.50% <93.47%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek added the adhoc Ad-hoc unplanned task added during the sprint. label Nov 20, 2026
@vdusek vdusek self-assigned this Nov 20, 2026
@vdusek
vdusek force-pushed the fix/wait-for-child-run-starts branch from 1915964 to 5ffab51 Compare November 20, 2026 17:52
@vdusek
vdusek marked this pull request as ready for review November 20, 2026 17:58
@vdusek
vdusek requested review from Pijukatel and barjin November 20, 2026 17:58
@vdusek
vdusek force-pushed the fix/wait-for-child-run-starts branch from 5ffab51 to 8e2a4da Compare November 20, 2026 18:38
@Pijukatel

Copy link
Copy Markdown
Contributor

Do we have this kind of handling for normal actor exits (that can be later resurrected as well)?
Something that will prevent new actor/tasks calls when exiting and also waiting for any that have not yet returned

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants